package com.zyd.shiro.persistence.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import com.zyd.shiro.persistence.beans.GoodsSpec;
import org.springframework.data.jpa.repository.Query;

/**
 * 数据访问接口
 *
 * @author Administrator
 */
public interface MallGoodsSpecDao extends JpaRepository<GoodsSpec, Integer>, JpaSpecificationExecutor<GoodsSpec> {

    @Query(value = "select * from mall_goods_spec image where image.goods_id = ?1",nativeQuery = true)
    GoodsSpec findByGoods_id(Integer goodsId);
}
